home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Online
/
TASC
/
rexx
/
Gooddomain.thor
< prev
next >
Wrap
Text File
|
1997-09-27
|
2KB
|
70 lines
/* $VER: Gooddomain.thor V0.1 (25/07/97)
* Takes a successful complaint & adds the senders domain to a file.
* This file can be used by TASC.thor to remind you that it's worth
* complaining here.
*/
/*============Don't change anything below here==================*/
options results
options failat 31
/* Read the config file & set up defalts if it isn't there */
if open(cfg,'Env:thor/TASC.cfg',r) then do
do until eof(cfg)
lin=readln(cfg)
parse var lin id ':' V
V=strip(V)
if upper(left(id,8))='DATABASE' then
spamdb=V
end
call close(cfg)
end
else do
spamdb='spam.db'
end
thorport = address()
if left(thorport, 5) ~= 'THOR.' then do
say 'Cannot find thorport.'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
if open(A,'env:thor/BBSdatapath') then do
BBSP=READLN(A)
call close(A)
end
address(thorport)
CURRENTMSG stem MSG
if (rc ~= 0) then call oops("No current message.")
address BBSREAD
READBRMESSAGE bbsname '"'MSG.BBSNAME'"' confname '"'MSG.CONFNAME'"' msgnr MSG.MSGNR headstem HEADTAGS textstem TEXTTAGS
if (rc ~= 0) then call oops
Parse VAR HEADTAGS.FROMADDR gubbins '@' domain
say HEADTAGS.FROMADDR
/*say domain||'->8-} >> '||BBSP||'db/'||spamdb*/
address command
'echo '||domain||'->8-} >> '||BBSP||'db/'||spamdb
oops:
PARSE ARG errmsg
if errmsg = '' then do
if address() = "BBSREAD" then errmsg=BBSREAD.LASTERROR
else errmsg=THOR.LASTERROR
end
address(thorport)
REQUESTNOTIFY TEXT '"' errmsg '"' BT '"_Abort"'
return
exit